import os;
import sys;

def crawlPage(xmlPath, url):
    cmd = 'wget -O ' + xmlPath + ' \"' + url + '\" > .crawl.log 2> .crawl.err.log';
    cmd = unicode(cmd).encode('utf-8');
    return os.system(cmd);
    
def fatal_error(message):
    print message;
    sys.exit(-1);    

if __name__ == '__main__':
    print crawlPage('test', 'haha') 
    print crawlPage('test', 'http://www.pku.edu.cn/') 
